#include <stdio.h>
#include <sys/shm.h>
#include <unistd.h>
#include <string.h>

typedef struct {
    char name[20];
    int age;
    char college[30];
    char major[20];
} student;

int main(int argc, char **argv) {
    int shmid;
    int i = 0;
    char *pshm;
    char buf[1024];
    student stu;
    shmid = shmget(1024, sizeof(student) * 10, 0666 | IPC_CREAT);
    if (shmid == -1) {
        printf("shmget error\n");
        return -1; 
    }
    printf("Shared memory created successfully\n");
    return 0;
}
